﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.AutoMapper;
using Abp.Domain.Repositories;
using Xugege.AbpExtension.Application.Extension.App.Dto;
using Xugege.AbpExtension.Core.Extension.App;

namespace Xugege.AbpExtension.Application.Extension.App
{
    public class NfcService : ApplicationService, INfcService
    {

        private readonly IRepository<WorkRecordEntity> _wordRecordRepository;

        public NfcService(IRepository<WorkRecordEntity> wordRecordRepository)
        {
            _wordRecordRepository = wordRecordRepository;

        }

        public async Task<bool> ReadNfc(WorkRecordDto input)
        {

            return await _wordRecordRepository.InsertAndGetIdAsync(input.MapTo<WorkRecordEntity>()) != 0;
        }
    }
}
